let todoinput = {
    template:`
        <header>
            <div myName="felix"></div>
            <section>
                <label for="title">ToDoList</label>
                <input type="text" 
                    id="title" 
                    name="title" 
                    placeholder="添加ToDo" 
                    required="required" 
                    autocomplete="off"
                    v-on:keyup.enter="handleKeyup"
                    v-model="keyword"
                />
            </section>
        </header>
    `,
    data(){
        return{
            keyword:''
        }
    },
    methods:{
        handleKeyup(){
            console.log(this.keyword);
            this.$emit('input-keywords',this.keyword);
            this.keyword = '';
        }
    }
}

export default todoinput